<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Navo Portable Library: TEA</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Navo Portable Library&#160;<span id="projectnumber">Ver 1.0.20120827</span></div>
   <div id="projectbrief">Provides generic platform independent facilities.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">数据结构</a> &#124;
<a href="#define-members">宏定义</a> &#124;
<a href="#typedef-members">类型定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<h1>TEA</h1>  </div>
<div class="ingroups"><a class="el" href="group___xE5_xAF_xB9_xE7_xA7_xB0_xE5_x8A_xA0_xE5_xAF_x86.html">对称加密</a></div></div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
数据结构</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtea__key.html">tea_key</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">TEA密钥  <a href="structtea__key.html#_details">更多...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
宏定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga252a19da7f2ffcbd432d99b2c6c70bf9"></a><!-- doxytag: member="TEA::TEA_KEY" ref="ga252a19da7f2ffcbd432d99b2c6c70bf9" args="(name)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__TEA.html#ga252a19da7f2ffcbd432d99b2c6c70bf9">TEA_KEY</a>(name)&#160;&#160;&#160;<a class="el" href="structtea__key.html">tea_key</a> name = {{0}}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义名为name的TEA密钥 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga93e61bc2bc649f3985679d551120bb04"></a><!-- doxytag: member="TEA::XTEA_KEY" ref="ga93e61bc2bc649f3985679d551120bb04" args="(name)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__TEA.html#ga93e61bc2bc649f3985679d551120bb04">XTEA_KEY</a>(name)&#160;&#160;&#160;<a class="el" href="structtea__key.html">xtea_key</a> name = {{0}}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义名为name的XTEA密钥 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__TEA.html#ga1fb06e844a2766aaac9a192c0a8cc896">xtea_set_key</a>(key, src_key)&#160;&#160;&#160;tea_set_key(key, src_key)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">设置TEA密钥  <a href="#ga1fb06e844a2766aaac9a192c0a8cc896"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
类型定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0bbf5b68eab08ab3b72fd39f2f91c9c8"></a><!-- doxytag: member="TEA::xtea_key" ref="ga0bbf5b68eab08ab3b72fd39f2f91c9c8" args="" -->
typedef struct <a class="el" href="structtea__key.html">tea_key</a>&#160;</td><td class="memItemRight" valign="bottom"><b>xtea_key</b></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__TEA.html#gaa86c31302c66ffbff07ab81f3c449ae2">tea_set_key</a> (<a class="el" href="structtea__key.html">tea_key</a> *key, void *src_key)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">设置TEA密钥  <a href="#gaa86c31302c66ffbff07ab81f3c449ae2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4299a6980170469f016dfe3ea623646d"></a><!-- doxytag: member="TEA::__tea_encrypt" ref="ga4299a6980170469f016dfe3ea623646d" args="(uint32_t *sk, uint32_t *dst, uint32_t *src)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__tea_encrypt</b> (uint32_t *sk, uint32_t *dst, uint32_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__TEA.html#ga9bcfe191b3b14287169ec5cc4108f656">tea_encrypt_block</a> (<a class="el" href="structtea__key.html">tea_key</a> *key, void *dst, void *src)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">TEA加密一个区块(8字节)  <a href="#ga9bcfe191b3b14287169ec5cc4108f656"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad3bec3e5115d9d41b33c3496077df493"></a><!-- doxytag: member="TEA::__tea_decrypt" ref="gad3bec3e5115d9d41b33c3496077df493" args="(uint32_t *sk, uint32_t *dst, uint32_t *src)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__tea_decrypt</b> (uint32_t *sk, uint32_t *dst, uint32_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__TEA.html#gae9461888506778a29e37303825a39e79">tea_decrypt_block</a> (<a class="el" href="structtea__key.html">tea_key</a> *key, void *dst, void *src)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">TEA解密一个区块(8字节)  <a href="#gae9461888506778a29e37303825a39e79"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga374535390e5308b2bd90faf2401c607c"></a><!-- doxytag: member="TEA::__xtea_encrypt" ref="ga374535390e5308b2bd90faf2401c607c" args="(uint32_t *sk, uint32_t *dst, uint32_t *src)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__xtea_encrypt</b> (uint32_t *sk, uint32_t *dst, uint32_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__TEA.html#gab6a07bc944ea57725b20796ca865bf9b">xtea_encrypt_block</a> (<a class="el" href="structtea__key.html">xtea_key</a> *key, void *dst, void *src)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">XTEA加密一个区块(8字节)  <a href="#gab6a07bc944ea57725b20796ca865bf9b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac516131100e2c44f4d2ef51ecdd2e70b"></a><!-- doxytag: member="TEA::__xtea_decrypt" ref="gac516131100e2c44f4d2ef51ecdd2e70b" args="(uint32_t *sk, uint32_t *dst, uint32_t *src)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__xtea_decrypt</b> (uint32_t *sk, uint32_t *dst, uint32_t *src)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__TEA.html#ga6abe8f001cc8add94445370fc7271a49">xtea_decrypt_block</a> (<a class="el" href="structtea__key.html">xtea_key</a> *key, void *dst, void *src)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">XTEA解密一个区块(8字节)  <a href="#ga6abe8f001cc8add94445370fc7271a49"></a><br/></td></tr>
</table>
<hr/><h2>宏定义文档</h2>
<a class="anchor" id="ga1fb06e844a2766aaac9a192c0a8cc896"></a><!-- doxytag: member="tea.h::xtea_set_key" ref="ga1fb06e844a2766aaac9a192c0a8cc896" args="(key, src_key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define xtea_set_key</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">key, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">src_key&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;tea_set_key(key, src_key)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>设置TEA密钥 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">key</td><td>XTEA密钥 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">src_key</td><td>16字节原始密钥 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="tea_8h_source.html">tea.h</a>第<a class="el" href="tea_8h_source.html#l00094">94</a>行定义。</p>

</div>
</div>
<hr/><h2>函数文档</h2>
<a class="anchor" id="gaa86c31302c66ffbff07ab81f3c449ae2"></a><!-- doxytag: member="tea.h::tea_set_key" ref="gaa86c31302c66ffbff07ab81f3c449ae2" args="(tea_key *key, void *src_key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void tea_set_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtea__key.html">tea_key</a> *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>src_key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>设置TEA密钥 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">key</td><td>TEA密钥 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">src_key</td><td>16字节原始密钥 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="tea_8c_source.html">tea.c</a>第<a class="el" href="tea_8c_source.html#l00022">22</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga9bcfe191b3b14287169ec5cc4108f656"></a><!-- doxytag: member="tea.h::tea_encrypt_block" ref="ga9bcfe191b3b14287169ec5cc4108f656" args="(tea_key *key, void *dst, void *src)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tea_encrypt_block </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtea__key.html">tea_key</a> *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>src</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>TEA加密一个区块(8字节) </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">key</td><td>TEA密钥 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>密文输出缓存，小端字节序 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>明文输入缓存 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="tea_8h_source.html">tea.h</a>第<a class="el" href="tea_8h_source.html#l00069">69</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gae9461888506778a29e37303825a39e79"></a><!-- doxytag: member="tea.h::tea_decrypt_block" ref="gae9461888506778a29e37303825a39e79" args="(tea_key *key, void *dst, void *src)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tea_decrypt_block </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtea__key.html">tea_key</a> *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>src</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>TEA解密一个区块(8字节) </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">key</td><td>TEA密钥 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>明文输出缓存 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>密文输入缓存，小端字节序 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="tea_8h_source.html">tea.h</a>第<a class="el" href="tea_8h_source.html#l00083">83</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gab6a07bc944ea57725b20796ca865bf9b"></a><!-- doxytag: member="tea.h::xtea_encrypt_block" ref="gab6a07bc944ea57725b20796ca865bf9b" args="(xtea_key *key, void *dst, void *src)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void xtea_encrypt_block </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtea__key.html">xtea_key</a> *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>src</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>XTEA加密一个区块(8字节) </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">key</td><td>XTEA密钥 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>密文输出缓存 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>明文输入缓存 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="tea_8h_source.html">tea.h</a>第<a class="el" href="tea_8h_source.html#l00105">105</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga6abe8f001cc8add94445370fc7271a49"></a><!-- doxytag: member="tea.h::xtea_decrypt_block" ref="ga6abe8f001cc8add94445370fc7271a49" args="(xtea_key *key, void *dst, void *src)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void xtea_decrypt_block </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structtea__key.html">xtea_key</a> *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>src</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>XTEA解密一个区块(8字节) </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">key</td><td>XTEA密钥 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">dst</td><td>明文输出缓存 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>密文输入缓存 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="tea_8h_source.html">tea.h</a>第<a class="el" href="tea_8h_source.html#l00119">119</a>行定义。</p>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2015年七月16日 星期四 12:00:41 for Navo Portable Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
